package org.itboys.mobile.service.mongo.weixin;

import org.itboys.mobile.entity.mongo.SundayComment;
import org.itboys.mobile.entity.mongo.SundayFindProduct;
import org.itboys.mobile.entity.mysql.SundayProduct;
import org.itboys.mongodb.core.MongoDataSource;
import org.itboys.mongodb.service.BaseMongoService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * Auther: 罗尧坤
 * Date: 2018/7/18
 * Description: 集楼_帮我找房_小程序_service
 */
@Service
public class SundayWeiXinFindProductService extends BaseMongoService<SundayFindProduct> {
    @Resource(name = "mobileDs")
    private MongoDataSource yefuDataSource;
    @Override
    protected MongoDataSource getMongoDataSource() {
        return yefuDataSource;
    }

    @Override
    protected Class<SundayFindProduct> getEntityClass() {
        return SundayFindProduct.class;
    }

    /**
     * 保存帮我找房的查询条件
     * @param memberId
     * @param minPrice
     * @param maxPrice
     * @param roomNum
     * @param productType
     * @param area
     * @param contactWay
     */
    public void save(Long memberId,Integer minPrice,Integer maxPrice,String roomNum,String productType,String area,String contactWay){
        SundayFindProduct findProduct = new SundayFindProduct(memberId,minPrice,maxPrice,roomNum,productType,area,contactWay);
        super.save(findProduct);
    }

}
